﻿<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>IDCard</title>
		<link  rel="stylesheet" type="text/css" href="../Resource/API.css"/>
	</head>
	<body>
		<div id="Main">
			<div id="IDCardReader-box" class="box">
				<p class="p1">身份证读卡器（IDCardReader）</p>
				<input id="AsyncCancel" class="button01" type="button" value="AsyncCancel" />
				<table class="funInfo">
					<tr>
						<th>说明：</th>
						<td>取消执行指令</td>
					</tr>
					<tr>
						<th>JS API：</th>
						<td class="js">IDCardReader.AsyncCancel()</td>
					</tr>
					<tr>
						<th>C#原型：</th>
						<td class="cSharp">string AsyncCancel()</td>
					</tr>
					<tr>
                       <th><span class="param">参数：</span></th>
					   <td>无</td>
					</tr>
					<tr>
						<th>返回值：</th>
						<td class="json">
                        WFS_SUCCESS
                        </td>
					</tr>
					<tr>
                      <th>JS回调：</th>
					  <td class="js">无</td>
					</tr>
				</table>
				<p class="p2">Result:</p>
				<p class="p3" id="AsyncCancel_Result"></p>
				<p class="p2">CallBack:</p>
				<p class="p3" id="AsyncCancel_CallBack"></p>
				<hr class="hr1" />
				
				<input id="AsyncCapabilities" class="button01" type="button" value="AsyncCapabilities" />
				<table class="funInfo">
					<tr>
						<th>说明：</th>
						<td>获取身份证读卡器设备功能</td>
					</tr>
					<tr>
						<th>JS API：</th>
						<td class="js">IDCardReader.AsyncCapabilities()</td>
					</tr>
					<tr>
						<th>C#原型：</th>
						<td class="cSharp">string AsyncCapabilities(uint nTimeout=ConstHelper.TIME_OUT, string eventArgsExStr = "")</td>
					</tr>
					<tr>
                       <th><span class="param">nTimeout</span></th>
					   <td>超时时间，可选，默认30S</td>
					</tr>
					<tr>
                       <th><span class="param">eventArgsExStr</span></th>
					   <td>扩展字段，可选</td>
					</tr>
					<tr>
						<th>返回值：</th>
						<td class="json">
                        {
                            "code":1,
                            "cmd":"CMD"
                        }
                        </td>
					</tr>
					<tr>
                      <th>JS回调：</th>
					  <td class="js">IDCardReaderAsyncCapabilitiesCallBack(msg)</td>
					</tr>
				</table>
				<p class="p2">Result:</p>
				<p class="p3" id="AsyncCapabilities_Result"></p>
				<p class="p2">CallBack:</p>
				<p class="p3" id="AsyncCapabilities_CallBack"></p>
				<hr class="hr1" />
				
				<input id="AsyncReadRawData" class="button01" type="button" value="AsyncReadRawData" />
				<table class="funInfo">
					<tr>
						<th>说明：</th>
						<td>读取身份证信息</td>
					</tr>
					<tr>
						<th>JS API：</th>
						<td class="js">IDCardReader.AsyncReadRawData()</td>
					</tr>
					<tr>
						<th>C#原型：</th>
						<td class="cSharp">string AsyncReadRawData(uint nTimeout=ConstHelper.TIME_OUT, string eventArgsExStr = "")</td>
					</tr>
					<tr>
                       <th><span class="param">nTimeout</span></th>
					   <td>超时时间，可选，默认30S</td>
					</tr>
					<tr>
                       <th><span class="param">eventArgsExStr</span></th>
					   <td>扩展字段，可选</td>
					</tr>
					<tr>
						<th>返回值：</th>
						<td class="json">
                        {
                            "code":1,
                            "cmd":"CMD"
                        }
                        </td>
					</tr>
					<tr>
                      <th>JS回调：</th>
					  <td class="js">IDCardReaderAsyncReadRawDataCallBack(msg)</td>
					</tr>
				</table>
				<p class="p2">Result:</p>
				<p class="p3" id="AsyncReadRawData_Result"></p>
				<p class="p2">CallBack:</p>
				<p class="p3" id="AsyncReadRawData_CallBack"></p>
				<hr class="hr1" />
				
				<input id="AsyncEjectCard" class="button01" type="button" value="AsyncEjectCard" />
				<table class="funInfo">
					<tr>
						<th>说明：</th>
						<td>弹出身份证</td>
					</tr>
					<tr>
						<th>JS API：</th>
						<td class="js">IDCardReader.AsyncEjectCard()</td>
					</tr>
					<tr>
						<th>C#原型：</th>
						<td class="cSharp">string AsyncEjectCard(uint nTimeout=ConstHelper.TIME_OUT, string eventArgsExStr = "")</td>
					</tr>
					<tr>
                       <th><span class="param">nTimeout</span></th>
					   <td>超时时间，可选，默认30S</td>
					</tr>
					<tr>
                       <th><span class="param">eventArgsExStr</span></th>
					   <td>扩展字段，可选</td>
					</tr>
					<tr>
						<th>返回值：</th>
						<td class="json">
                        {
                            "code":1,
                            "cmd":"CMD"
                        }
                        </td>
					</tr>
					<tr>
                      <th>JS回调：</th>
					  <td class="js">IDCardReaderAsyncEjectCardCallBack(msg)</td>
					</tr>
				</table>
				<p class="p2">Result:</p>
				<p class="p3" id="AsyncEjectCard_Result"></p>
				<p class="p2">CallBack:</p>
				<p class="p3" id="AsyncEjectCard_CallBack"></p>
				<hr class="hr1" />
				
				<input id="AsyncRetainCard" class="button01" type="button" value="AsyncRetainCard" />
				<table class="funInfo">
					<tr>
						<th>说明：</th>
						<td>回收身份证</td>
					</tr>
					<tr>
						<th>JS API：</th>
						<td class="js">IDCardReader.AsyncRetainCard()</td>
					</tr>
					<tr>
						<th>C#原型：</th>
						<td class="cSharp">string AsyncRetainCard(uint nTimeout=ConstHelper.TIME_OUT, string eventArgsExStr = "")</td>
					</tr>
					<tr>
                       <th><span class="param">nTimeout</span></th>
					   <td>超时时间，可选，默认30S</td>
					</tr>
					<tr>
                       <th><span class="param">eventArgsExStr</span></th>
					   <td>扩展字段，可选</td>
					</tr>
					<tr>
						<th>返回值：</th>
						<td class="json">
                        {
                            "code":1,
                            "cmd":"CMD"
                        }
                        </td>
					</tr>
					<tr>
                      <th>JS回调：</th>
					  <td class="js">IDCardReaderAsyncRetainCardCallBack(msg)</td>
					</tr>
				</table>
				<p class="p2">Result:</p>
				<p class="p3" id="AsyncRetainCard_Result"></p>
				<p class="p2">CallBack:</p>
				<p class="p3" id="AsyncRetainCard_CallBack"></p>
				<hr class="hr1" />
				
				<input id="AsyncReset" class="button01" type="button" value="AsyncReset" />
				<input id="AsyncReset_Text" class="text01" type="text" value="noaction" />
				<span>eject,retain,noaction</span>
				<table class="funInfo">
					<tr>
						<th>说明：</th>
						<td>重置身份证读卡器</td>
					</tr>
					<tr>
						<th>JS API：</th>
						<td class="js">IDCardReader.AsyncReset(string strResetIn)</td>
					</tr>
					<tr>
						<th>C#原型：</th>
						<td class="cSharp">string AsyncReset(string strResetIn, uint nTimeout=ConstHelper.TIME_OUT, string eventArgsExStr = "")</td>
					</tr>
					<tr>
                       <th><span class="param">strResetIn</span></th>
					   <td>动作，<strong style="color: red;">必填</strong>，{eject:弹出所发现的任何卡，retain:吞卡所发现的任何卡，noaction:对所发现的任何卡不应执行任何操作}</td>
					</tr>
					<tr>
                       <th><span class="param">nTimeout</span></th>
					   <td>超时时间，可选，默认30S</td>
					</tr>
					<tr>
                       <th><span class="param">eventArgsExStr</span></th>
					   <td>扩展字段，可选</td>
					</tr>
					<tr>
						<th>返回值：</th>
						<td class="json">
                        {
                            "code":1,
                            "cmd":"CMD"
                        }
                        </td>
					</tr>
					<tr>
                      <th>JS回调：</th>
					  <td class="js">IDCardReaderAsyncResetCallBack(msg)</td>
					</tr>
				</table>
				<p class="p2">Result:</p>
				<p class="p3" id="AsyncReset_Result"></p>
				<p class="p2">CallBack:</p>
				<p class="p3" id="AsyncReset_CallBack"></p>
				<hr class="hr1" />
				
				<input id="AsyncStatus" class="button01" type="button" value="AsyncStatus" />
				<table class="funInfo">
					<tr>
						<th>说明：</th>
						<td>获取身份证读卡器状态信息</td>
					</tr>
					<tr>
						<th>JS API：</th>
						<td class="js">IDCardReader.AsyncStatus()</td>
					</tr>
					<tr>
						<th>C#原型：</th>
						<td class="cSharp">string AsyncStatus(uint nTimeout=ConstHelper.TIME_OUT, string eventArgsExStr = "")</td>
					</tr>
					<tr>
                       <th><span class="param">nTimeout</span></th>
					   <td>超时时间，可选，默认30S</td>
					</tr>
					<tr>
                       <th><span class="param">eventArgsExStr</span></th>
					   <td>扩展字段，可选</td>
					</tr>
					<tr>
						<th>返回值：</th>
						<td class="json">
                        {
                            "code":1,
                            "cmd":"CMD"
                        }
                        </td>
					</tr>
					<tr>
                      <th>JS回调：</th>
					  <td class="js">IDCardReaderAsyncStatusCallBack(msg)</td>
					</tr>
				</table>
				<p class="p2">Result:</p>
				<p class="p3" id="AsyncStatus_Result"></p>
				<p class="p2">CallBack:</p>
				<p class="p3" id="AsyncStatus_CallBack"></p>
				<hr class="hr1" />
			</div>
		</div>
		<script type="text/javascript" src="../Resource/jquery.js"></script>
		<script type="text/javascript">
			//身份证读卡器
			document.getElementById("AsyncCancel").onclick=function(){
				var result=window.external.IDCardReader.AsyncCancel();
				document.getElementById("AsyncCancel_Result").innerText=result;
			}
			
			document.getElementById("AsyncCapabilities").onclick=function(){
				var result=window.external.IDCardReader.AsyncCapabilities(30000);
				document.getElementById("AsyncCapabilities_Result").innerText=result;
			}
			function M_IDCardReaderAsyncCapabilitiesCallBack(msg){
				document.getElementById("AsyncCapabilities_CallBack").innerText=msg;
			}
			
			document.getElementById("AsyncReadRawData").onclick=function(){
				var result=window.external.IDCardReader.AsyncReadRawData(30000);
				document.getElementById("AsyncReadRawData_Result").innerText=result;
			}
			function M_IDCardReaderAsyncReadRawDataCallBack(msg){
				document.getElementById("AsyncReadRawData_CallBack").innerText=msg;
			}
			
			document.getElementById("AsyncEjectCard").onclick=function(){
				var result=window.external.IDCardReader.AsyncEjectCard(30000);
				document.getElementById("AsyncEjectCard_Result").innerText=result;
			}
			function M_IDCardReaderAsyncEjectCardCallBack(msg){
				document.getElementById("AsyncEjectCard_CallBack").innerText=msg;
			}
			
			document.getElementById("AsyncRetainCard").onclick=function(){
				var result=window.external.IDCardReader.AsyncRetainCard(30000);
				document.getElementById("AsyncRetainCard_Result").innerText=result;
			}
			function M_IDCardReaderAsyncRetainCard(msg){
				document.getElementById("AsyncRetainCard_CallBack").innerText=msg;
			}
			
			document.getElementById("AsyncReset").onclick=function(){
				var str=document.getElementById("AsyncReset_Text").value;
				var result=window.external.IDCardReader.AsyncReset(str,30000);
				document.getElementById("AsyncReset_Result").innerText=result;
			}
			function M_IDCardReaderAsyncReset(msg){
				document.getElementById("AsyncReset_CallBack").innerText=msg;
			}
			
			document.getElementById("AsyncStatus").onclick=function(){
				var result=window.external.IDCardReader.AsyncStatus(30000);
				document.getElementById("AsyncStatus_Result").innerText=result;
			}
			function M_IDCardReaderAsyncStatus(msg){
				document.getElementById("AsyncStatus_CallBack").innerText=msg;
			}
		</script>
	</body>
</html>
